<!DOCTYPE html>
<html lang="zh-cn">
<head>

  <meta charset="utf-8" />

  
  <title>Linux常用命令</title>

  
  





  
  <meta name="author" content="" />
  <meta name="description" content="本文说明：文章主要用于自己备忘，记录的是在日常工作娱乐中用到的一些命令及软件包，并不一定都是常用命令。基础命令完全没有收集。所以不适用于初学" />

  
  
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="@gohugoio" />
    <meta name="twitter:title" content="Linux常用命令" />
    <meta name="twitter:description" content="本文说明：文章主要用于自己备忘，记录的是在日常工作娱乐中用到的一些命令及软件包，并不一定都是常用命令。基础命令完全没有收集。所以不适用于初学" />
    <meta name="twitter:image" content="https://buyaoshushu.gitee.io/img/avatar.jpg" />
  

  
  <meta property="og:type" content="article" />
  <meta property="og:title" content="Linux常用命令" />
  <meta property="og:description" content="本文说明：文章主要用于自己备忘，记录的是在日常工作娱乐中用到的一些命令及软件包，并不一定都是常用命令。基础命令完全没有收集。所以不适用于初学" />
  <meta property="og:url" content="https://buyaoshushu.gitee.io/post/2015-09-19-linux-command/" />
  <meta property="og:image" content="https://buyaoshushu.gitee.io/img/avatar.jpg" />




<meta name="generator" content="Hugo 0.42.1" />


<link rel="canonical" href="https://buyaoshushu.gitee.io/post/2015-09-19-linux-command/" />
<link rel="alternative" href="/index.xml" title="不要叔叔" type="application/atom+xml" />


<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="format-detection" content="telephone=no,email=no,adress=no" />
<meta http-equiv="Cache-Control" content="no-transform" />


<meta name="robots" content="index,follow" />
<meta name="referrer" content="origin-when-cross-origin" />







<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="不要叔叔" />
<meta name="msapplication-tooltip" content="不要叔叔" />
<meta name='msapplication-navbutton-color' content="#5fbf5e" />
<meta name="msapplication-TileColor" content="#5fbf5e" />
<meta name="msapplication-TileImage" content="/img/tile-image-windows.png" />
<link rel="icon" href="/img/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png" />
<link rel="icon" sizes="192x192" href="/img/touch-icon-android.png" />
<link rel="apple-touch-icon" href="/img/touch-icon-apple.png" />
<link rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#5fbf5e" />



<link rel="stylesheet" href="//cdn.bootcss.com/video.js/6.2.8/alt/video-js-cdn.min.css" />

<link rel="stylesheet" href="/css/bundle.ff02473a9a.css" />


  
  <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <script src="//cdn.bootcss.com/video.js/6.2.8/ie8/videojs-ie8.min.js"></script>
  <![endif]-->

<!--[if lte IE 11]>
    <script src="//cdn.bootcss.com/classlist/1.1.20170427/classList.min.js"></script>
  <![endif]-->


<script src="//cdn.bootcss.com/object-fit-images/3.2.3/ofi.min.js"></script>


<script src="//cdn.bootcss.com/smooth-scroll/12.1.4/js/smooth-scroll.polyfills.min.js"></script>


</head>
  <body>
    
    <div class="suspension">
      <a title="Go to top" class="to-top is-hide"><span class="icon icon-up"></span></a>
      
        
      
    </div>
    
    
  <header class="site-header">
  <img class="avatar" src="/img/avatar.jpg" alt="Avatar">
  
  <h2 class="title">不要叔叔</h2>
  
  <p class="subtitle"></p>
  <button class="menu-toggle" type="button">
    <span class="icon icon-menu"></span>
  </button>
  <nav class="site-menu collapsed">
    <h2 class="offscreen">Main Menu</h2>
    <ul class="menu-list">
      
      
      
      
        <li class="menu-item
            
            
            ">
            <a href="/">Home</a>
          </li>
      
        <li class="menu-item
            
            
            ">
            <a href="/posts/">Blog</a>
          </li>
      
        <li class="menu-item
            
            
            ">
            <a href="/about/">About</a>
          </li>
      
    </ul>
  </nav>
  <nav class="social-menu collapsed">
    <h2 class="offscreen">Social Networks</h2>
    <ul class="social-list">

      

      

      

      

      

      

      

      

      

      

      

      

      

      

      

      <li class="social-item">
        <a href="//weibo.com/buyaoshushu" title="Weibo"><span class="icon icon-weibo"></span></a>
      </li>

      

      

      

      

      

      <li class="social-item">
        <a href="/index.xml"><span class="icon icon-rss" title="RSS"></span></a>
      </li>

    </ul>
  </nav>
</header>

  <section class="main post-detail">
    <header class="post-header">
      <h1 class="post-title">Linux常用命令</h1>
      <p class="post-meta">@ · Aug 17, 2015 · 2 min read</p>
    </header>
    <article class="post-content">

<blockquote>
<p>本文说明：文章主要用于自己备忘，记录的是在日常工作娱乐中用到的一些命令及软件包，并不一定都是常用命令。基础命令完全没有收集。所以不适用于初学者。另外，处理命令还有一些软件记录。如果对命令或软件有疑问可以直接评论给我。我会第一时间回复的。</p>
</blockquote>

<p>ssh端口转发
ssh -C -f -N -g -L 3999:127.0.0.1:3306 root@server.ip.domain</p>

<h1 id="linux">Linux</h1>

<h3 id="文件搜索">文件搜索</h3>

<h4 id="搜索文件">搜索文件</h4>

<pre><code class="language-bash">#in ubuntu
mlocate
#in archlinux
locate
</code></pre>

<h4 id="更新索引">更新索引</h4>

<pre><code class="language-bash">updatedb
</code></pre>

<h4 id="文件内搜索-学习中">文件内搜索（学习中）</h4>

<pre><code class="language-bash">#新发现的方法
tracker
</code></pre>

<h3 id="中文man">中文man</h3>

<pre><code class="language-bash">pacman -Ss man-pages-zh_cn
</code></pre>

<h3 id="窗口管理">窗口管理</h3>

<pre><code class="language-bash">#用户激活管理窗口等，可以实现快捷键激活某程序
wmctrl -a
</code></pre>

<h3 id="挂载">挂载</h3>

<pre><code class="language-bash">mount.ntfs-3g /dev/sda4 /media/others -n -o rw,utf8,uid=1000,gid=1000,dmask=022,fmask=133
</code></pre>

<h3 id="随机输出文本">随机输出文本</h3>

<pre><code class="language-bash">sort -R
</code></pre>

<h3 id="播放软件">播放软件</h3>

<pre><code class="language-bash">mplayer -playlist &quot;playlistfile&quot;
</code></pre>

<h3 id="创建ssh公钥">创建SSH公钥</h3>

<pre><code class="language-bash">cd ~/.ssh
ssh-keygen -t rsa -C &quot;your_email@youremail.com&quot; 
</code></pre>

<h3 id="配置多屏幕">配置多屏幕</h3>

<pre><code class="language-bash">xrandr
#关闭内置屏幕
xrandr --output LVDS1 --off
#启动屏幕 
xrandr --output LVDS1 --auto
</code></pre>

<h3 id="配置音量">配置音量</h3>

<pre><code class="language-bash">amixer
amixer -D pulse set Master 40%
#alias to volume
</code></pre>

<h3 id="保存url或html文件为图片">保存URL或HTML文件为图片</h3>

<pre><code class="language-bash">cutycapt --url=http://file:// --out=filename
</code></pre>

<h3 id="压缩图片质量-转换图片格式等等-图片处理神器">压缩图片质量，转换图片格式等等，图片处理神器</h3>

<pre><code class="language-bash">convert -quality 70 fromimg.jpg toimg.jpg
</code></pre>

<h2 id="禁用触摸板">禁用触摸板</h2>

<pre><code class="language-bash">#临时禁止
sudo modprobe -r psmouse
#开启触摸板
sudo modprobe -a psmouse
#永远禁用触摸板
sudo vi /etc/modprobe.d/blacklist.conf
blacklist psmouse
</code></pre>

<h2 id="awesome">awesome</h2>

<h3 id="不能显示壁纸">不能显示壁纸</h3>

<pre><code class="language-bash">pacman -S feh
</code></pre>

<h3 id="个性化配置文件">个性化配置文件</h3>

<pre><code class="language-bash">cp /etc/xdg/awesome/rc.lua ~/.config/awesome/rc.lua
</code></pre>

<h2 id="软件记录">软件记录</h2>

<h3 id="轻量级文件管理器">轻量级文件管理器</h3>

<p>thunar</p>

<h3 id="图形化svn">图形化SVN</h3>

<p>rapidsvn</p>

<h3 id="邮件客户端">邮件客户端</h3>

<p>thunderbird</p>

<h3 id="文本编辑">文本编辑</h3>

<p>wps et wpp
vim
vimcdoc-svn</p>

<h3 id="声音设置">声音设置</h3>

<pre><code class="language-bash">#in alsa
alsamixer
#in puseaudio
pavucontrol
</code></pre>

<h3 id="百度云管理">百度云管理</h3>

<pre><code class="language-bash">bcloud-gui
bypy
</code></pre>

<h3 id="屏幕取色">屏幕取色</h3>

<p>gpick</p>

<h3 id="markdown编辑器">markdown编辑器</h3>

<p>remarkable</p>

<h3 id="看图">看图</h3>

<p>sxiv
sxiv -t 缩略图模式
feh</p>

<h3 id="截图">截图</h3>

<p>scrot</p>

<h3 id="自动换壁纸软件">自动换壁纸软件</h3>

<p>variety需要修改配置文件用以在awesome或i3中使用</p>

<h3 id="随机命令">随机命令</h3>

<p>shuf</p>

<h3 id="看视频">看视频</h3>

<pre><code class="language-bash">mpv
#使用shift+q退出可以保存上次退出位置
</code></pre>

<h3 id="科学计算">科学计算</h3>

<pre><code class="language-bash">Scilab 
</code></pre>

<h3 id="查询窗口信息">查询窗口信息</h3>

<pre><code class="language-bash">xprop WM_CLASS
</code></pre>

<h3 id="屏保管理">屏保管理</h3>

<pre><code class="language-bash">xset DPMS 
</code></pre>

<h3 id="无线管理">无线管理</h3>

<pre><code class="language-bash">netctl-auto
wifi-menu
</code></pre>

<h3 id="音乐播放器">音乐播放器</h3>

<pre><code class="language-bash">mpd
#前端
ario/ncmpc/ncmpcpp/osdlyrics
</code></pre>

<h3 id="日程管理">日程管理</h3>

<pre><code>task
</code></pre>

<h3 id="电子书">电子书</h3>

<p>calibre</p>

<h3 id="音频编辑">音频编辑</h3>

<p>Audacity
ardour
qtractor
lmms
snd
DJ工具
mixxx
mp3标签管理
easytag</p>

<h3 id="游戏">游戏</h3>

<p>openra 开源红色警戒
wesnoth 韦诺之战</p>

<h3 id="游戏平台">游戏平台</h3>

<p>Humble Store?
steam</p>

<h2 id="建模流程绘图">建模流程绘图</h2>

<p>yEd
umbrello</p>

<h3 id="按键精灵">按键精灵</h3>

<p>xdotool</p>

<h3 id="源测速">源测速</h3>

<pre><code class="language-bash">sudo reflector --verbose --country 'China' -l 20 -p http \
--sort rate --save /etc/pacman.d/mirrorlist
</code></pre>

<h3 id="清理无用软件包">清理无用软件包</h3>

<pre><code class="language-bash">pacman -Qtd | awk '{print $1}' | xargs -t yaourt -R
</code></pre>

<h3 id="gtk主题管理">GTK主题管理</h3>

<p>lxappearance</p>

<h3 id="更新ｄｎｓ">更新ＤＮＳ</h3>

<pre><code class="language-bash">sudo systemctl restart nscd.service
</code></pre>

<h3 id="终端乱码">终端乱码</h3>

<pre><code class="language-bash">luit -encoding gbk telnet 123.125.116.212 6666
</code></pre>

<h3 id="搜狗输入法皮肤安装">搜狗输入法皮肤安装</h3>

<p>使用sogou-qimpanel打开皮肤文件</p>

<h3 id="鼠标控制">鼠标控制</h3>

<p>keynav-git</p>
</article>
    <footer class="post-footer">
      
      <ul class="post-tags">
        
          <li><a href="/tags/linux"><span class="tag">Linux</span></a></li>
        
          <li><a href="/tags/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0"><span class="tag">学习笔记</span></a></li>
        
          <li><a href="/tags/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4"><span class="tag">常用命令</span></a></li>
        
      </ul>
      
      <p class="post-copyright">
        This post was published <strong>1037</strong> days ago, content in the post may be inaccurate, even wrong now, please take risk yourself.
      </p>
    </footer>
    
      
    
  </section>
  <footer class="site-footer">
  <p>© 2017-2018 不要叔叔</p>
  <p>Powered by <a href="https://gohugo.io/" target="_blank">Hugo</a> with theme <a href="https://github.com/laozhu/hugo-nuo" target="_blank">Nuo</a>.</p>
  
</footer>



<script async src="//cdn.bootcss.com/video.js/6.2.8/alt/video.novtt.min.js"></script>
<script async src="//cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [['$','$'], ['\\(','\\)']],
      displayMath: [['$$','$$'], ['\\[','\\]']],
      processEscapes: true,
      processEnvironments: true,
      skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
      TeX: { equationNumbers: { autoNumber: "AMS" },
      extensions: ["AMSmath.js", "AMSsymbols.js"] }
    }
  });
</script>
<script type="text/x-mathjax-config">
  // Fix <code> tags after MathJax finishes running. This is a
  // hack to overcome a shortcoming of Markdown. Discussion at
  // https://github.com/mojombo/jekyll/issues/199
  MathJax.Hub.Queue(() => {
    MathJax.Hub.getAllJax().map(v => v.SourceElement().parentNode.className += ' has-jax');
  });
</script>

<script src="/js/bundle.d1288006cf.js"></script>




  </body>
</html>
